package pw.yumc.Residence.manager;

import org.bukkit.entity.Bat;
import org.bukkit.entity.Chicken;
import org.bukkit.entity.Cow;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Ghast;
import org.bukkit.entity.Horse;
import org.bukkit.entity.IronGolem;
import org.bukkit.entity.Monster;
import org.bukkit.entity.Ocelot;
import org.bukkit.entity.Pig;
import org.bukkit.entity.Rabbit;
import org.bukkit.entity.Sheep;
import org.bukkit.entity.Slime;
import org.bukkit.entity.Snowman;
import org.bukkit.entity.Squid;
import org.bukkit.entity.Villager;
import org.bukkit.entity.Wolf;

import pw.yumc.Residence.ResidenceMain;

public class EntityManager {
    ResidenceMain plugin;

    public EntityManager(final ResidenceMain plugin) {
        this.plugin = plugin;
    }

    public boolean isAnimal(final Entity ent) {
        return (ent instanceof Horse || ent instanceof Bat || ent instanceof Snowman || ent instanceof IronGolem || ent instanceof Ocelot || ent instanceof Pig || ent instanceof Sheep
                || ent instanceof Chicken || ent instanceof Wolf || ent instanceof Cow || ent instanceof Squid || ent instanceof Villager || (plugin.isGt1_8() && ent instanceof Rabbit));
    }

    public boolean isMonster(final Entity ent) {
        return (ent instanceof Monster || ent instanceof Slime || ent instanceof Ghast);
    }
}
